package com.zrrd.controller;


import com.zrrd.common.page.GoodsTypePageVo;
import com.zrrd.common.util.ResponseResult;
import com.zrrd.service.GoodsTypeService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wanjl
 * @since 2024-09-13
 */
@RestController
@RequestMapping("/admin/goodsType")
@ResponseBody
public class GoodsTypeController {

    @Resource
    private GoodsTypeService goodsTypeService;

    @GetMapping("/{page}")
    public ResponseResult findByPage(@PathVariable("page") Integer page,
                                   @RequestParam(value = "limit",required = false,defaultValue = "10") Integer limit) {
        GoodsTypePageVo goodsTypePageVo = goodsTypeService.findByPage(page, limit);
        return ResponseResult.queryResponse(goodsTypePageVo);
    }

}

